package com.gzc.just.play.last.war.centralserver.match.model;

import java.util.Map;
import java.util.concurrent.CompletableFuture;

public class MatchRequest {
    private long matchId;
    private long userId;
    private long teamId;
    private MatchType matchType;
    private int mapId;
    private Map<String, Object> preferences;
    private long requestTime;
    private MatchStatus status;
    private CompletableFuture<MatchResult> matchFuture;
    
    public MatchRequest() {
        this.status = MatchStatus.PENDING;
        this.preferences = new java.util.HashMap<>();
    }
    
    // Getters and Setters
    public long getMatchId() {
        return matchId;
    }
    
    public void setMatchId(long matchId) {
        this.matchId = matchId;
    }
    
    public long getUserId() {
        return userId;
    }
    
    public void setUserId(long userId) {
        this.userId = userId;
    }
    
    public long getTeamId() {
        return teamId;
    }
    
    public void setTeamId(long teamId) {
        this.teamId = teamId;
    }
    
    public MatchType getMatchType() {
        return matchType;
    }
    
    public void setMatchType(MatchType matchType) {
        this.matchType = matchType;
    }
    
    public int getMapId() {
        return mapId;
    }
    
    public void setMapId(int mapId) {
        this.mapId = mapId;
    }
    
    public Map<String, Object> getPreferences() {
        return preferences;
    }
    
    public void setPreferences(Map<String, Object> preferences) {
        this.preferences = preferences;
    }
    
    public long getRequestTime() {
        return requestTime;
    }
    
    public void setRequestTime(long requestTime) {
        this.requestTime = requestTime;
    }
    
    public MatchStatus getStatus() {
        return status;
    }
    
    public void setStatus(MatchStatus status) {
        this.status = status;
    }
    
    public CompletableFuture<MatchResult> getMatchFuture() {
        return matchFuture;
    }
    
    public void setMatchFuture(CompletableFuture<MatchResult> matchFuture) {
        this.matchFuture = matchFuture;
    }
    
    @Override
    public String toString() {
        return "MatchRequest{" +
                "matchId=" + matchId +
                ", userId=" + userId +
                ", teamId=" + teamId +
                ", matchType=" + matchType +
                ", mapId=" + mapId +
                ", status=" + status +
                '}';
    }
    
    public enum MatchStatus {
        PENDING,
        MATCHED,
        CANCELLED,
        TIMEOUT
    }
}
